<?php if(isset($_SESSION['userlogin']) && count($_SESSION['userlogin']>4)){
    require_once 'kelas/fungsi.php';
    echo $objFungsi->redirect(BASEURL.'?v=myprofile');
    exit;
}; ?>
<link rel="stylesheet" type="text/css" href="<?php echo BASEURL . 'css/isi.css'; ?>">
<div style="width:60%;float:left">
    <h2>Pendaftaran</h2>
    <form  name="frmDaftar" method="POST" action="<?php echo BASEURL . 'proses/pelanggan.php?on=daftar' ?>">
        <table class="tabel-data" style="" border="0">
            <tr><td style="text-align:right">Nama</td><td><input class="text_box_3" required="required" name="nama"/></td></tr>
            <tr><td style="text-align:right">Tanggal Lahir</td><td><input placeholder="Format yyyy-mm-dd" name="lahir" required="required" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Kota</td><td><input name="kota" required="required" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Alamat</td><td><textarea name="alamat" class="text_box_3" required="required"></textarea></td></tr>
            <tr><td style="text-align:right">Jenis Kelamin</td><td><select class="text_box_3" name="jk" required="required"><option></option><option value="L">Laki-Laki</option><option value="P">Perempuan</option></select></td></tr>
            <tr><td style="text-align:right">Telepon</td><td><input name="telepon" type="text" required="required" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Email</td><td><input name="email" type="email" required="required" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Username</td><td><input name="username" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Password</td><td><input name="password" id="password" value="" required="required" type="password" class="text_box_3"/></td></tr>
            <tr><td style="text-align:right">Konfirmasi Password</td><td><input type="password" name="repassword" class="text_box_3"/></td></tr>
            <tr><td colspan="2"><input name="" type="submit" value="Daftar" class="text_box_100"/><input type="reset" value="Reset" class="text_box_100"/></td></tr>

        </table>
    </form>
</div>
<div style="float:left;width:40%">
    <h4>Sudah Punya Akun?</h4>
    <p>Login</p>
    <form method="POST" action="<?php echo BASEURL.'proses/pelanggan.php?on=login'; ?>">
        <table>
            <tr><td style="text-align:right">Username atau Email</td><td><input class="text_box_100" type="text" name="username"/></td></tr>
            <tr><td style="text-align:right">Password</td><td><input type="password" class="text_box_100" name="password"/></td></tr>
            <tr><td style="text-align:right" colspan="2"><input type="submit" class="text_box_100" value="Login"/><input class="text_box_100" type="reset" value="Reset"/></td></tr>

        </table>
    </form>
</div>
<script type="text/javascript">
$(document).ready(function(){
    var frmDaftar = $(document).find('form[name="frmDaftar"]');
    frmDaftar.validate({
     rules:{
        nama:{
            required:true,
            minlength:3
        },
        tanggal:{
            date:true,
            format:'Y-m-d'

        },
        telepon:{
            number:true,
            minlength:10
        },
        kota:{
            minlength:3
        },
        password:{
            required:true,
            minlength:5
        },
        username:{
            required:true,
            minlength:5
        },
        repassword:{
            required:true,
            equalTo:'#password'
        }
    }
        });

});
</script>